#ifndef DIR_STACK_H
#define DIR_STACK_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct dirNode_s{
    char* cname;
    struct dirNode_s* next;
}dirNode_t;


typedef struct dirStack_s{
    dirNode_t* bottom;
    dirNode_t* top;
    int stackElement;
}dirStack_t;

dirNode_t* createNewNode(char* commandName);
dirStack_t* initDirStack();
int destoryDirStack(dirStack_t* dstack);

int pushDirStack(dirStack_t* dstack,char* cname);
int popDirStack(dirStack_t* dstack,char* cname);
void print_dirstack(dirStack_t* dstack);


#endif

